<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8" />
        <title>关注时回复</title>
        <link rel="stylesheet" href="__PUBLIC__/Leader/css/bootstrap.css">
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/Leader/css/index.css" />
        <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
        <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.min.js"> </script>
        <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
        <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
        <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
        <style type="text/css">
            .order-list a {
                position: relative;
            }
            .order-list span {
                float: right;
                margin-right: 20px;
            }
            .pagination ul {
                display: inline-block;
                margin-left: 0;
                margin-bottom: 0;
                -webkit-border-radius: 3px;
                -moz-border-radius: 3px;
                border-radius: 3px;
                -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
                -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
                box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            }
            .pagination ul > li {
                display: inline;
            }
            .pagination ul > li > a, .pagination ul > li > span {
                float: left;
                padding: 0 14px;
                line-height: 38px;
                text-decoration: none;
                background-color: #ffffff;
                border: 1px solid #dddddd;
                border-left-width: 0;
            }
        </style>
    </head>
    <body>
        <include file="Index/head"/>
        <div class="wrapper main-wrapper wrapper-content ">
            <div class="page-menubar">
                <!--<div class="menu-header">微信管理</div>-->
                <ul class="order-list">
                    <li>
                        <a href="{:U('Wx/wx_menu/wid/1')}"><img src="__PUBLIC__/images/ic-11.png" alt="" class="com-icon">自定义菜单</a>
                    </li>
                    <li class="active">
                        <a href="{:U('Wx/huifu')}"><img src="__PUBLIC__/images/ic-12.png" alt="" class="com-icon">关注时回复</a>
                    </li>
                    <li>
                        <a href="{:U('Wx/zdhf')}"><img src="__PUBLIC__/images/ic-13.png" alt="" class="com-icon">自动回复</a>
                    </li>
                </ul>
            </div>
            <!--主要内容-->
            <div class="page-content" style="display: block;">
                <!--内容标题-->
                <div class="page-heading" style="position:relative;">
                    <h2>代运线路管理</h2>
                </div>
                <div class="panel panel-default" style="margin-top: 20px;">
                    <div class="panel-body">
                        <div id="myTabContent" class="tab-content">
                            <div class="tab-pane active in" id="home">
                                <form role="form" enctype="multipart/form-data" method="POST">
                                    <input type="hidden" value="{$info['id']}" name="id" class="input-xlarge">
                                    <div class="form-group">
                                      <label for="name">关键字：</label>
                                      <input type="text" class="form-control" value="{$info['key']}" name="key" style="width:40%;">
                                    </div>
                                    <div class="form-group">
                                      <label for="name">标题：</label>
                                      <input type="text" class="form-control" value="{$info['title']}" name="title" style="width:40%;">
                                    </div>
                                    <div class="form-group">
                                      <label for="name">内容：</label>
                                      <input type="text" class="form-control" value="{$info['description']}" name="description" style="width:40%;">
                                    </div>
                                    <div class="form-group">
                                      <label for="name">url：</label>
                                      <input type="text" class="form-control" value="{$info['url']}" name="url" style="width:40%;">
                                    </div>
                                    <div class="form-group">
                                      <label for="name">图片：</label>
                                      <input type="hidden" value="{$info['picurl']}" class='picurl2' name="picurl2" class="input-xlarge">
                                      <input type="file" class="form-control"  name="picurl" onchange="upload('picurl2')" id="picurl2" style="width:40%;">
                                    </div>
                                    <div class="form-group">
                                      <label for="name">详细内容：</label>
                                      <textarea id="container" name="info"  style="width:800px;">
                                            {$info['info']|htmlspecialchars_decode|stripslashes}
                                       </textarea>
                                    </div>
                                    <div class="form-group">
                                      <button  type="button" class="btn btn-primary" onclick="submit()">添加</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </body>
    <script src="__PUBLIC__/Leader/js/jquery.js" type="text/javascript" charset="utf-8"></script>
    <script src="__PUBLIC__/Leader/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
        //实例化编辑器
           var ue = UE.getEditor('container',{
               autoHeight: true,
               initialFrameHeight:400,
       //        toolbars: [[
       //            'fullscreen', 'source', '|', 'undo', 'redo', '|','bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
       //            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
       //            'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
       //            'directionalityltr', 'directionalityrtl', 'indent', '|',
       //            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
       //            'link', 'unlink', 'anchor'
       //        ]]
           });
            function upload(file) {
                var formData = new FormData();
                formData.append('file', $('#' + file)[0].files[0]);
                $.ajax({
                    url: "",
                    type: 'POST',
                    cache: false,
                    data: formData,
                    processData: false,
                    contentType: false,
                }).done(function (res) {
                    $("."+file).val(res);
                    console.log(res)
                }).fail(function (res) {
                    alert("上传失败")
                });
            }
   </script>
   <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            $('.demo-cancel-click').click(function(){return false;});
        });
    </script>
</html>